package day01;

import java.util.LinkedList;

/**
 * @author feng
 * @Date 2021/10/17 10:27
 */
public class LinkedListTest {
    public static void main(String[] args) {
        LinkedList list = new LinkedList();
        list.add("a");
        list.add("b");
        list.add("c");
        list.add("f");
        System.out.println(list);
        list.offer("mm");
        list.addFirst("g");
        list.addLast("h");
        //检索但不删除元素的头
        System.out.println(list.peek());
        System.out.println(list);


    }
}
